/**
 * 编程实现用户输入年月日信息，判断这一天是这一年中的第几天并打印
 */
import java.util.Scanner;

public class DayOfYearCheck {
    
    public static void main(String[] args) {

        //声明一年每个月对应的天数数组
        int[] days = {31,28,31,30,31,30,31,31,30,31,30,31};
        
        System.out.println("请输入年月日信息！");
        Scanner sc = new Scanner(System.in);
        int year = sc.nextInt();
        int month = sc.nextInt();
        int day = sc.nextInt();

        boolean isLeapYear = true;
        int indOfDay = 0;
        int isIntYear = year % 100;
        
        if(isIntYear == 0){
            isLeapYear = year % 400 == 0 ?true:false;
        }else{
            isLeapYear = year % 4 == 0 ?true:false;
        }

        if(isLeapYear){
            days[1] = 29;
        }

        for(int i=0;i<month-1;i++){
            int monthDay = days[i];
            indOfDay += monthDay;
        }
        indOfDay += day;
        System.out.println(year + "年" + month + "月" + day + "日是这一年中的第" + indOfDay + "天");
        
    }

}